package com.martin;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.SurfaceView;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.animation.RotateAnimation;
import android.view.animation.TranslateAnimation;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.martin.kill.CimovFligeSurface;
import com.martin.kill.CustomArc;
import com.martin.kill.AddKillList;
import com.martin.kill.ReadSystemMemoryActivity;

public class Right_Left_Activ extends Activity {
	public static boolean running;
	CustomArc mProgress;
	int progress = 0;
	Thread mThread;
	ImageView lajitong, lajitong_back;
	private CimovFligeSurface tCimovFligeSurface;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.right_left_activ);
		// overridePendingTransition(R.anim.enter_righttoleft,
		// R.anim.out_lefttoright);
tCimovFligeSurface = new CimovFligeSurface(Right_Left_Activ.this,
				(SurfaceView) findViewById(R.id.list_surfaceview));
		Right_Left_Activ.this.addContentView(tCimovFligeSurface.RetView(),
				new LayoutParams(LayoutParams.WRAP_CONTENT,
						LayoutParams.WRAP_CONTENT));
		initKillList();
		findViewById(R.id.iv_left_icon).setOnClickListener(
				new OnClickListener() {

					@Override
					public void onClick(View arg0) {
						startActivity(new Intent().setClass(
								Right_Left_Activ.this, MainActivity.class));
						overridePendingTransition(R.anim.enter_righttoleft,
								R.anim.out_lefttoright);
						finish();

					}
				});

		
	}

	private void initKillList() {
		long l = System.currentTimeMillis();
		RelativeLayout v = (RelativeLayout) findViewById(R.id.left_activ);
		LinearLayout kill_listView_linear = (LinearLayout) LayoutInflater
				.from(C.context).inflate(R.layout.kill_list_view_layout, null)
				.findViewById(R.id.kill_listview_linear);
		v.addView(kill_listView_linear);
		lajitong = (ImageView) kill_listView_linear
				.findViewById(R.id.iv_right_icon);
		lajitong_back = (ImageView) kill_listView_linear
				.findViewById(R.id.iv_right_back);

		AddKillList killList = new AddKillList(kill_listView_linear, lajitong,
				lajitong_back,tCimovFligeSurface);
		kill_listView_linear.addView(killList.getView());

		System.out.println("tag " + (System.currentTimeMillis() - l) + "ms");
	}
}
